package com.cloud.alibaba.service.impl;

import com.cloud.alibaba.dao.StorageDao;
import com.cloud.alibaba.service.StorageService;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2020/8/24 15:54
 */
@Service
@Slf4j(topic = "StorageServiceImpl")
public class StorageServiceImpl implements StorageService {
    @Resource
    private StorageDao storageDao;
    @Override
    public void decrease(Long productId,Integer count) {
        log.info("------->storage-service中扣减库存开始");
        storageDao.decrease(productId,count);
        log.info("------->storage-service中扣减库存结束");
    }
}
